//
//  ViewController.m
//  QQNavgation
//
//  Created by 苗钧豪 on 16/7/21.
//  Copyright © 2016年 苗钧豪. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:0.102 green:0.659 blue:0.953 alpha:1.000];
    UISegmentedControl *segment = [[UISegmentedControl alloc]initWithItems:@[@"消息",@"电话"]];
    self.navigationItem.titleView = segment;
    self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:(UIBarButtonSystemItemAdd) target:self action:@selector(right)];
    UIImageView *imgview = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"123"]];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:imgview];
}
- (void)right {
    
}
- (void)left {
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
